<?php

namespace catchAdmin\externalGoods\controller;

use catchAdmin\externalGoods\model\CreditDeduction as CreditDeductionModel;
use catchAdmin\externalGoods\service\CategoryService as externalCategoryService;
use catchAdmin\externalGoods\service\CreditDeductionService;
use catcher\base\CatchRequest as Request;
use houniao\api\v1\Areas;
use think\Request as ThinkRequest;
use catcher\CatchAdmin;
use catcher\CatchAuth;
use catcher\CatchResponse;
use houniao\api\v1\Goods as GoodsApi;

class CreditDeduction extends CatchAdmin
{
    public function __construct(CreditDeductionModel $model)
    {
        $this->model = $model;
    }

    //列表
    public function index(CatchAuth $auth,Request $request){
        //$params = $request->filterEmptyField()->param();
        $service = new CreditDeductionService();
        $tenant_id = $auth->user()['tenant_id'];
        $result = $service->getList($tenant_id);

        return CatchResponse::paginate($result);
    }
}